package org.mikeliu.exp4.fun1;

import java.util.Scanner;

class Rectangle 
{
	private double width,height;

	public Rectangle(double width, double height) 
	{
		super();
		this.width = width;
		this.height = height;
	}
	
	public Rectangle() 
	{
		this(1, 1);
	}
	public String getArea()
	{
		return String.format("%.2f", this.width*this.height);
	}
	public String getPerimeter()
	{
		return String.format("%.2f", (this.height+this.width)*2);
	}
}

public class Main {
  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);

    double w = input.nextDouble();
    double h = input.nextDouble();
    Rectangle myRectangle = new Rectangle(w, h);
    System.out.println(myRectangle.getArea());
    System.out.println(myRectangle.getPerimeter());

    input.close();
  }
}
